package cn.legend.travel.destination.main.pojo.vo;

import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import org.springframework.data.elasticsearch.annotations.*;
import org.springframework.data.elasticsearch.core.completion.Completion;

import java.io.Serializable;
import java.util.concurrent.locks.Condition;

import static org.springframework.data.elasticsearch.annotations.FieldType.Text;

/**
 * 省市区实体类
 *
 * @author java@tedu.cn
 * @version 1.0
 **/
@Data
@Document(indexName = "destination_table")
@Setting(settingPath = "my_pinyin.json")
@Mapping(mappingPath = "my_pinyin_type.json")
public class DistrictVO implements Serializable {

    /**
     * 数据ID
     */
    @TableId
    @Field(type = FieldType.Long)
    private Long id;
    /**
     * 名称
     */
    @Field
    private String name;
    //经纬度
    @Field
    private String location;
    /**
     * 收藏数量
     */
    private Long collectionCount;
    /**
     * 简介
     */
    @Field(analyzer = "ik_smart", searchAnalyzer = "ik_smart", type = Text)
    private String brief;

    /**
     * 浏览数量
     */
    private Long viewCount;
    /**
     * 父级单位ID
     */
    private Long pId;
    /**
     * 封面图url
     */
    private String coverUrl;

    @Field(analyzer = "my-analyzer", searchAnalyzer = "ik_smart")
    private String pinyin;

}
